<template>
	<view class="myFiles">
		<web-view :src="webViewUrl"></web-view>
<!-- 		<uni-nav-bar dark :fixed="true" :border="false" background-color="#FFFFFF" status-bar 
			title="客户详情" left-icon="left" @clickLeft="toBack" color="#000" />
		<view class="myFiles-body">
			<u--form labelPosition="left" :model="client" ref="uForm">
				<u-form-item label="姓名" borderBottom>
					<u--input v-model="client.name" disabled disabledColor="#ffffff" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="性别" borderBottom>
					<u--input v-model="client.sex" disabled disabledColor="#ffffff" 
						placeholder="性别" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="年龄" borderBottom>
					<u--input v-model="client.name" disabled disabledColor="#ffffff" 
						placeholder="年龄" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="邮箱" borderBottom>
					<u--input v-model="client.name" disabled disabledColor="#ffffff" 
						placeholder="邮箱" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="电话" borderBottom>
					<u--input v-model="client.name" disabled disabledColor="#ffffff" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="状态" borderBottom>
					<u--input v-model="client.name" disabled disabledColor="#ffffff" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="公司" borderBottom>
					<u--input v-model="client.name" disabled disabledColor="#ffffff" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="地址" borderBottom>
					<u--input v-model="client.name" disabled disabledColor="#ffffff" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="约谈时间" borderBottom>
					<u--input v-model="client.name" disabled disabledColor="#ffffff" border="none">
					</u--input>
				</u-form-item>
				<u-form-item label="备注" borderBottom>
					<u--input v-model="client.name" disabled disabledColor="#ffffff" border="none">
					</u--input>
				</u-form-item>
			</u--form>
		</view> -->
	</view>
</template>

<script>
	import clientApi from '../../request/clientApi';
	import config from "../../request/config.js";
	export default {
		data() {
			return {
				webViewUrl: "",
				clientId: '',
				client: {}
			}
		},
		onLoad(params) {
			let path = params.path
			console.log("path===>",path)
			let token = uni.getStorageSync("OaAuth")
			let userInfo = uni.getStorageSync("loginUser")
			let baseUrl = config.WEB_VIEW_URL+path
			this.webViewUrl = baseUrl+"?token="+token+"&user="+JSON.stringify(userInfo)
			// this.clientId = params.id
			// this.getClients();
		},
		methods: {
			// 返回上个页面
			toBack() {
				uni.navigateBack({
					delta: 1, // 返回的页面数，1表示返回上一页
					animationType: 'pop-out', // 页面关闭的动画效果
					animationDuration: 300, // 页面关闭的动画时间
				});
			},
			getClients() {
				const data = {
					id: this.clientId
				}
				clientApi.getClients(data).then(res => {
					if (res.code === 200){
						this.client=res.data
					}
				})
			}
		}
	}
</script>

<style>
	.myFiles {
		min-height: 100vh;
		/* background-color: #eeeeef; */
	}
	
	.myFiles-body{
		padding: 0 20rpx;
	}
</style>